$OpenBSD: patch-configure_ac,v 1.18 2012/02/21 08:46:08 ajacoutot Exp $
--- configure.ac.orig	Tue Feb 21 00:26:32 2012
+++ configure.ac	Tue Feb 21 09:16:15 2012
@@ -516,6 +516,8 @@ AG_GST_CHECK_FEATURE(GST_V4L2, [Video 4 Linux 2], v4l2
 #ifdef __sun /* Solaris */
 #include <sys/types.h>
 #include <sys/videodev2.h>
+#elif defined __OpenBSD__
+#include <sys/videoio.h>
 #else /* Linux */
 #include <linux/types.h>
 #define _LINUX_TIME_H
@@ -557,6 +559,8 @@ return 0;
 #ifdef __sun /* Solaris */
 #include <sys/types.h>
 #include <sys/videodev2.h>
+#elif defined __OpenBSD__
+#include <sys/videoio.h>
 #else /* Linux */
 #include <linux/types.h>
 #define _LINUX_TIME_H
@@ -903,6 +907,21 @@ AG_GST_CHECK_FEATURE(SHOUT2, [Shoutcast/Icecast client
   AG_GST_PKG_CHECK_MODULES(SHOUT2, shout >= 2.0)
 ])
 
+dnl *** sndio ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_SNDIO, true)
+AG_GST_CHECK_FEATURE(SNDIO, [sndio audio], sndio, [
+  AC_CHECK_HEADER(sndio.h, HAVE_SNDIO="yes", HAVE_SNDIO="no")
+  if test $HAVE_SNDIO = yes
+  then
+    AC_CHECK_LIB(sndio, sio_open, HAVE_SNDIO="yes", HAVE_SNDIO="no", [])
+    if test $HAVE_SNDIO = yes
+    then
+      SNDIO_LIBS=-lsndio 
+      AC_SUBST(SNDIO_LIBS)
+    fi
+  fi
+])
+
 dnl *** soup ***
 translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
 AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
@@ -1042,6 +1061,7 @@ AM_CONDITIONAL(USE_OSX_AUDIO, false)
 AM_CONDITIONAL(USE_OSX_VIDEO, false)
 AM_CONDITIONAL(USE_PULSE, false)
 AM_CONDITIONAL(USE_SHOUT2, false)
+AM_CONDITIONAL(USE_SNDIO, false)
 AM_CONDITIONAL(USE_SOUP, false)
 AM_CONDITIONAL(USE_SPEEX, false)
 AM_CONDITIONAL(USE_SUNAUDIO, false)
@@ -1173,6 +1193,7 @@ ext/libpng/Makefile
 ext/pulse/Makefile
 ext/raw1394/Makefile
 ext/shout2/Makefile
+ext/sndio/Makefile
 ext/soup/Makefile
 ext/speex/Makefile
 ext/taglib/Makefile
